package com.ibeeking.found.common.enums.marketing;

/**
 * @Author ibeeking
 */

public enum MarketingConfigEnum {

    /**
     * 清理会员券包过期优惠券
     */
    CLEAR_EXPIRED_COUPON("clear_expired_coupon", "清理会员券包过期优惠券"),
    CLEAR_EXPIRED_CAMPAIGN("clear_expired_campaign", "清理过期活动"),
    ;

    private String code;
    private String description;

    MarketingConfigEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public String getCode() {
        return code;
    }

    public static String getDescriptionByCode(String code) {
        for (MarketingConfigEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getDescription();
            }
        }
        return null;
    }
}
